<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 当使用promise的then链式调用时, 在中间中断, 不再调用后面的回调函数
        // 解决方案：在回调函数中返回一个pendding状态的promise对象
        let p1 = Promise.resolve((res,rej)=>{
            throw 'ok';
        });
        console.log(p1);

        let p = Promise.resolve(new Promise((res,rej)=>{
            throw 'ok';
        }));

        console.log(p);

        // arr.forEach, √
        // arr.map, √
        // arr.reduce,√
        // arr.filter,√
        // arr.some,
        // arr.every, 
        // arr.find,√
        // arr.findIndex, 
        
    </script>
</body>

</html>